/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ubisalusserver;

import Controller.Controller;
import GUI.GUIServer;
import java.io.IOException;

/**
 *
 * @author gianmariospacagna
 */
public class UbiSalusServer {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
        // TODO code application logic here
        Controller controller = new Controller();
        if (args.length > 0) {
            int port = Integer.parseInt(args[0]);
            
            controller.startServer(port);
            controller.startFetcher();
        }
        else{
            new GUIServer(controller).setVisible(true);
        }
        
        
    }
}
